<?php if(!defined('IN_UCHOME')) exit('Access Denied');?><?php subtplcheck('template/default/space_friend|template/default/header|template/default/space_menu|template/default/space_list|template/default/footer', '1229958143', 'template/default/space_friend');?><?php $_TPL['titles'] = array('好友'); ?>
<?php if(empty($_SGLOBAL['inajax'])) { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?=$_SC['charset']?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title><?php if($_TPL['titles']) { ?><?php if(is_array($_TPL['titles'])) { foreach($_TPL['titles'] as $value) { ?><?php if($value) { ?><?=$value?> - <?php } ?><?php } } ?><?php } ?><?php if($space) { ?><?=$_SN[$space['uid']]?> - <?php } ?><?=$_SCONFIG['sitename']?> - Powered by UCenter Home</title>
<script language="javascript" type="text/javascript" src="source/script_common.js"></script>
<script language="javascript" type="text/javascript" src="source/script_menu.js"></script>
<script language="javascript" type="text/javascript" src="source/script_ajax.js"></script>
<script language="javascript" type="text/javascript" src="source/script_face.js"></script>
<script language="javascript" type="text/javascript" src="source/script_manage.js"></script>
<style type="text/css">
@import url(template/<?=$_SC['template']?>/style.css);
<?php if(!empty($_SGLOBAL['space_theme'])) { ?>
@import url(theme/<?=$_SGLOBAL['space_theme']?>/style.css);
<?php } ?>
<?php if(!empty($_SGLOBAL['space_css'])) { ?>
<?=$_SGLOBAL['space_css']?>
<?php } ?>
</style>
<link rel="shortcut icon" href="image/favicon.ico" />
<link rel="edituri" type="application/rsd+xml" title="rsd" href="xmlrpc.php?rsd=<?=$space['uid']?>" />
</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>

<div id="header">
<?php if($_SGLOBAL['ad']['header']) { ?><div id="ad_header"><?php adshow('header'); ?></div><?php } ?>
<div class="headerwarp">
<h1 class="logo"><a href="index.php"><img src="<?=$_SCONFIG['sitelogo']?>" alt="<?=$_SCONFIG['sitename']?>" /></a></h1>
<ul class="menu">
<?php if($_SGLOBAL['supe_uid']) { ?>
<li><a href="space.php?do=home">首页</a></li>
<li><a href="space.php">个人主页</a></li>
<li><a href="space.php?do=friend">好友</a></li>
<li><a href="network.php">随便看看</a></li>

<?php if($_SGLOBAL['appmenu']) { ?>
<?php if($_SGLOBAL['appmenus']) { ?>
<li class="ucmenu" onmouseover="subop(this)" onmouseout="subop(this)" >
<a href="<?=$_SGLOBAL['appmenu']['url']?>" title="<?=$_SGLOBAL['appmenu']['name']?>" target="_blank"><?=$_SGLOBAL['appmenu']['name']?></a>
<ul id="ucmenu" style="display:none;">
<li><a href="<?=$_SGLOBAL['appmenu']['url']?>" title="<?=$_SGLOBAL['appmenu']['name']?>" target="_blank"><?=$_SGLOBAL['appmenu']['name']?></a></li>
<?php if(is_array($_SGLOBAL['appmenus'])) { foreach($_SGLOBAL['appmenus'] as $value) { ?>
<li><a href="<?=$value['url']?>" title="<?=$value['name']?>" target="_blank"><?=$value['name']?></a></li>
<?php } } ?>
</ul>
</li>
<?php } else { ?>
<li><a href="<?=$_SGLOBAL['appmenu']['url']?>" title="<?=$_SGLOBAL['appmenu']['name']?>" target="_blank"><?=$_SGLOBAL['appmenu']['name']?></a></li>
<?php } ?>
<?php } ?>

<li><a href="space.php?do=pm">消息<?php if(!empty($_SGLOBAL['member']['newpm'])) { ?>(新)<?php } ?></a></li>
<?php if(!empty($_SGLOBAL['member']['notenum'])) { ?><li class="notify"><a href="space.php?do=notice"><?=$_SGLOBAL['member']['notenum']?>条新通知</a></li><?php } ?>
<?php } else { ?>
<li><a href="index.php">首页</a></li>
<li><a href="network.php">随便看看</a></li>
<li><a href="help.php">帮助</a></li>
<?php } ?>
</ul>

<div class="nav_account">
<?php if($_SGLOBAL['supe_uid']) { ?>
<a href="space.php?uid=<?=$_SGLOBAL['supe_uid']?>" class="login_thumb"><img src="<?php echo avatar($_SGLOBAL[supe_uid],small); ?>" alt="<?=$_SN[$_SGLOBAL['supe_uid']]?>" width="20" height="20" /></a>
<a href="space.php?uid=<?=$_SGLOBAL['supe_uid']?>" class="loginName"><?=$_SN[$_SGLOBAL['supe_uid']]?></a>
<?php if($_SN[$_SGLOBAL['supe_uid']]!=$_SGLOBAL['username']) { ?>(<?=$_SGLOBAL['supe_username']?>)<?php } ?>
<br />
<?php if(empty($_SCONFIG['closeinvite'])) { ?><a href="cp.php?ac=invite">邀请</a> | <?php } ?><a href="cp.php">设置</a> | <a href="cp.php?ac=privacy">隐私</a> | <a href="cp.php?ac=common&op=logout">退出</a>
<?php } else { ?>
<a href="do.php?ac=<?=$_SCONFIG['register_action']?>" class="login_thumb"><img src="<?php echo avatar($_SGLOBAL[supe_uid],small); ?>" width="20" height="20" /></a>
欢迎您<br>
<a href="do.php?ac=<?=$_SCONFIG['login_action']?>">登录</a> | 
<a href="do.php?ac=<?=$_SCONFIG['register_action']?>">注册</a>
<?php } ?>
</div>
</div>
</div>

<div id="wrap">

<?php if(empty($_TPL['nosidebar'])) { ?>
<div id="main">

<div id="app_sidebar">
<?php if($_SGLOBAL['supe_uid']) { ?>
<ul class="app_list" id="default_userapp">
<li><img src="image/app/doing.gif"><a href="space.php?do=doing">记录</a></li>
<li><img src="image/app/album.gif"><a href="space.php?do=album">相册</a><em><a href="cp.php?ac=upload">上传</a></em></li>
<li><img src="image/app/blog.gif"><a href="space.php?do=blog">日志</a><em><a href="cp.php?ac=blog">发表</a></em></li>
<li><img src="image/app/mtag.gif"><a href="space.php?do=mtag">群组</a><em><a href="cp.php?ac=thread">话题</a></em></li>
<li><img src="image/app/share.gif"><a href="space.php?do=share">分享</a></li>

<?php if($_SCONFIG['my_status']) { ?>
<?php if(is_array($_SGLOBAL['userapp'])) { foreach($_SGLOBAL['userapp'] as $value) { ?>
<li><img src="http://appicon.manyou.com/icons/<?=$value['appid']?>"><a href="userapp.php?id=<?=$value['appid']?>"><?=$value['appname']?></a></li>
<?php } } ?>
<?php } ?>
</ul>

<?php if($_SCONFIG['my_status']) { ?>
<ul class="app_list" id="my_userapp">
<?php if(is_array($_SGLOBAL['my_menu'])) { foreach($_SGLOBAL['my_menu'] as $value) { ?>
<li id="userapp_li_<?=$value['appid']?>"><img src="http://appicon.manyou.com/icons/<?=$value['appid']?>"><a href="userapp.php?id=<?=$value['appid']?>" title="<?=$value['appname']?>"><?=$value['appname']?></a></li>
<?php } } ?>
</ul>
<?php } ?>

<?php if($_SGLOBAL['my_menu_more']) { ?>
<p class="app_more"><a href="javascript:;" id="a_app_more" onclick="userapp_open();" class="off">展开</a></p>
<?php } ?>

<?php if($_SCONFIG['my_status']) { ?>
<div class="app_m">
<ul>
<li><img src="image/app_add.gif"><a href="cp.php?ac=userapp&my_suffix=%2Fapp%2Flist" class="addApp">添加应用</a></li>
<li><img src="image/app_set.gif"><a href="cp.php?ac=userapp&op=menu" class="myApp">管理应用</a></li>
</ul>
</div>
<?php } ?>

<?php } else { ?>
<div class="bar_text">
<form id="loginform" name="loginform" action="do.php?ac=<?=$_SCONFIG['login_action']?>&ref" method="post">
<input type="hidden" name="formhash" value="<?php echo formhash(); ?>" />
<p class="title">登录站点</p>
<p>用户名</p>
<p><input type="text" name="username" id="username" class="t_input" size="15" value="" /></p>
<p>密码</p>
<p><input type="password" name="password" id="password" class="t_input" size="15" value="" /></p>
<p><input type="checkbox" id="cookietime" name="cookietime" value="315360000" checked /><label for="cookietime">记住我</label></p>
<p>
<input type="submit" id="loginsubmit" name="loginsubmit" value="登录" class="submit"  />
<a href="do.php?ac=<?=$_SCONFIG['register_action']?>" class="button">注册</a>
</p>
</form>
</div>
<?php } ?>
</div>

<div id="mainarea">
<?php } ?>

<?php } ?>


<?php if($space['self']) { ?>
<div class="searchbar">
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<script type="text/javascript" src="source/script_autocomplete.js"></script>
<table cellspacing="0" cellpadding="0">
<tr>
<td style="padding: 0;"><input type="text" id="username" name="username" value="搜索好友" onfocus="if(this.value=='搜索好友')this.value='';" class="t_input" tabindex="1" onclick="auc.handleEvent(this.value ,event);" onkeyup="auc.handleEvent(this.value ,event);inputKeyDown(event, 1);" onkeydown="closeOpt(event);inputKeyDown(event);" autocomplete="off" style="width: 160px; border-right: none;" /></td>
<td style="padding: 0;"><a href="javascript:searchFriend();"><img src="image/search_btn.gif" alt="搜索" /></a></td>
</tr>
</table>
<div id="username_menu" class="ajax_selector" onclick="$('username_menu').style.display='none';" style="display:none">
<div class="ajax_selector_option" style="width: 181px; height: 100px;">
<a href="javascript:;" onclick="$('username_menu').style.display='none';" class="float_del" style="margin-right: 5px;">a</a>
<ul id="friendlist" class="blocklink"></ul>
</div>
</div>
</td>
</tr>
</table>
</div>
<h2 class="title"><img src="image/icon/friend.gif" />好友</h2>
<div class="tabs_header">
<ul class="tabs">
<li<?=$actives['me']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend"><span>好友列表</span></a></li>
<li><a href="cp.php?ac=friend&op=find"><span>可能认识的人</span></a></li>
<?php if(empty($_SCONFIG['closeinvite'])) { ?>
<li><a href="cp.php?ac=invite"><span>邀请好友</span></a></li>
<?php } ?>
</ul>
</div>
<div id="content" style="width: 640px;">

<div class="c_mgs"><div class="ye_r_t"><div class="ye_l_t"><div class="ye_r_b"><div class="ye_l_b">
<?php if($_GET['view']=='blacklist') { ?>
加入到黑名单的用户，将会从您的好友列表中删除。同时，对方将不能进行与您相关的打招呼、踩日志、加好友、评论、留言、短消息等互动行为。
<?php } elseif($_GET['view']=='me') { ?>
好友列表按照好友热度高低排序<br>
好友热度是系统根据您与好友之间交互的动作自动累计的一个参考值，数值越大，表示您与这位好友互动越频繁。
<?php } elseif($_GET['view']=='online') { ?>
<?php if($_GET['type'] == 'friend') { ?>
这些好友当前在线，赶快去拜访一下吧
<?php } elseif($_GET['type']=='near') { ?>
通过系统匹配，这些朋友就在您附近，您可能认识他们
<?php } else { ?>
显示当前全部在线的用户
<?php } ?>
<?php } elseif($_GET['view']=='visitor') { ?>
他们拜访过您，回访一下吧
<?php } elseif($_GET['view']=='trace') { ?>
您曾经拜访过的用户列表
<?php } elseif($_GET['view']=='me') { ?>
<?php } ?>
</div></div></div></div></div>

<?php if($_GET['view']=='blacklist') { ?>
<div class="h_status">
<h2>添加新黑名单用户</h2>
<form method="post" name="blackform" action="cp.php?ac=friend&op=blacklist&start=<?=$_GET['start']?>">
用户名：<input type="text" name="username" value="" size="15">
<input type="submit" name="blacklistsubmit_btn" id="moodsubmit_btn" value="添加" class="submit">
<input type="hidden" name="blacklistsubmit" value="true" />
<input type="hidden" name="formhash" value="<?php echo formhash(); ?>" />
</form>
</div>
<?php } ?>

<?php if($list) { ?>
<div class="thumb_list" id="friend_ul">
<ul>
<?php if(is_array($list)) { foreach($list as $key => $value) { ?>
<li>
<div class="avatar48"><a href="space.php?uid=<?=$value['uid']?>"><img src="<?php echo avatar($value[uid],small); ?>" alt="<?=$_SN[$value['uid']]?>" width="48" height="48" /></a></div>
<div class="thumbTitle"><p<?php if($ols[$value['uid']]) { ?> class="online_icon_p"<?php } ?>><a href="space.php?uid=<?=$value['uid']?>"<?php g_color($value[groupid]); ?>><?=$_SN[$value['uid']]?></a> <?php g_icon($value[groupid]); ?></p></div>
<?php if($value['note']) { ?><div><?=$value['note']?></div><?php } ?>

<?php if($_GET['view']=='blacklist') { ?>
<div class="setti"><a href="cp.php?ac=friend&op=blacklist&subop=delete&uid=<?=$value['uid']?>&start=<?=$_GET['start']?>">黑名单除名</a></div>
<?php } elseif($_GET['view']=='visitor' || $_GET['view'] == 'trace') { ?>
<div class="setti"><?php echo sgmdate('n月j号',$value[dateline],1); ?></div>
<?php } elseif($_GET['view']=='online') { ?>
<div class="setti"><?php echo sgmdate('H:i',$ols[$value[uid]],1); ?></div>
<?php } else { ?>
<?php if($ols[$value['uid']]) { ?><div class="setti"><?php echo sgmdate('H:i',$ols[$value[uid]],1); ?></div><?php } ?>
<div class="setti">
<?php if($value['num']) { ?>热度(<?=$value['num']?>)<span class="pipe">|</span><?php } ?>
<?php if(!$value['isfriend']) { ?>
<a href="cp.php?ac=friend&op=add&uid=<?=$value['uid']?>" id="a_friend_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999, '', -1)">加为好友</a>
<?php } else { ?>
<a href="cp.php?ac=friend&op=changegroup&uid=<?=$value['uid']?>" id="a_group_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999)">分组</a><span class="pipe">|</span>
<a href="cp.php?ac=friend&op=ignore&uid=<?=$value['uid']?>" id="a_ignore_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
<?php } ?>
</div>
<?php } ?>
</li>
<?php } } ?>
</ul>
</div>
<div class="page"><?=$multi?></div>

<?php } else { ?>
<div class="c_form">
没有相关用户列表。
</div>
<?php } ?>

</div>


<div id="sidebar" style="width: 150px;">
<div class="cat">
<h3>
好友菜单
</h3>
<ul>
<li<?=$a_actives['me']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend">全部好友列表</a></li>
<li<?=$a_actives['onlinefriend']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend&view=online&type=friend">当前在线的好友</a></li>
<li<?=$a_actives['onlinenear']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend&view=online&type=near">就在我附近的朋友</a></li>
<li<?=$a_actives['visitor']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend&view=visitor">我的访客</a></li>
<li<?=$a_actives['trace']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend&view=trace">我的足迹</a></li>
<li<?=$a_actives['blacklist']?>><a href="space.php?uid=<?=$space['uid']?>&do=friend&view=blacklist">我的黑名单</a></li>
</ul>
</div>

<?php if($groups) { ?>
<div class="cat">
<h3>
<span class="r_option"><a href="cp.php?ac=friend&op=group">批量分组</a></span>
好友分组
</h3>
<ul class="post_list line_list">
<li><a href="space.php?do=friend&group=-1">全部好友</a></li>
<?php if(is_array($groups)) { foreach($groups as $key => $value) { ?>
<li>
<?php if(isset($space['privacy']['filter_gid'][$key])) { ?><span class="gray">[屏蔽]</span><?php } ?> <a href="space.php?do=friend&group=<?=$key?>" <?=$groupselect[$key]?>><span id="friend_groupname_<?=$key?>"><?=$value?></span></a>
<?php if($key) { ?>
<a href="cp.php?ac=friend&op=groupname&group=<?=$key?>" id="c_edit_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999, '', -1)" title="编辑用户组名" class="c_edit">编辑</a>
<?php } ?>
<a href="cp.php?ac=friend&op=groupignore&group=<?=$key?>" id="c_ignore_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999)" title="屏蔽用户组动态" class="c_delete">屏蔽</a>
</li>
<?php } } ?>
</ul>
</div>
<?php } ?>

</div>
<?php } else { ?>
<?php $_TPL['spacetitle'] = "好友"; ?>
<div class="c_header a_header">
<div class="avatar48"><a href="space.php?uid=<?=$space['uid']?>"><img src="<?php echo avatar($space[uid],small); ?>" alt="<?=$_SN[$space['uid']]?>" /></a></div>
<p style="font-size:14px"><?=$_SN[$space['uid']]?>的<?=$_TPL['spacetitle']?></p>
<a href="space.php?uid=<?=$space['uid']?>" class="spacelink"><?=$_SN[$space['uid']]?>的主页</a>
<?php if($_TPL['spacemenus']) { ?>
<?php if(is_array($_TPL['spacemenus'])) { foreach($_TPL['spacemenus'] as $value) { ?><span class="pipe">|</span> <?=$value?><?php } } ?>
<?php } else { ?>
<span class="pipe">|</span> <a href="cp.php?ac=poke&op=send&uid=<?=$space['uid']?>" id="a_poke" onclick="ajaxmenu(event, this.id, 99999, '', -1)">打个招呼</a>
<?php } ?>
</div>
<div class="tabs_header">
<ul class="tabs">
<?php if(ckprivacy('index')) { ?><li<?php if(empty($do)) { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>"><span>主页</span></a></li><?php } ?>
<?php if(ckprivacy('doing')) { ?><li<?php if($do=='doing') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=doing&view=me"><span>记录</span></a></li><?php } ?>
<?php if(ckprivacy('blog')) { ?><li<?php if($do=='blog') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=blog&view=me"><span>日志</span></a></li><?php } ?>
<?php if(ckprivacy('album')) { ?><li<?php if($do=='album') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=album&view=me"><span>相册</span></a></li><?php } ?>
<?php if(ckprivacy('share')) { ?><li<?php if($do=='share') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=share&view=me"><span>分享</span></a></li><?php } ?>
<?php if(ckprivacy('mtag')) { ?><li<?php if($do=='mtag'||$do=='thread') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=thread&view=me"><span>话题</span></a></li><?php } ?>
<?php if(ckprivacy('wall')) { ?><li<?php if($do=='wall') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=wall&view=me"><span>留言</span></a></li><?php } ?>
<?php if(ckprivacy('friend')) { ?><li<?php if($do=='friend') { ?> class="active"<?php } ?>><a href="space.php?uid=<?=$space['uid']?>&do=friend&view=me"><span>好友</span></a></li><?php } ?>
</ul>
</div>

<div class="c_form l_status">共有 <?=$space['friendnum']?> 个好友</div>
<div class="space_list">
<?php if($list) { ?>
<table cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr>
<td width="30">&nbsp;</td>
<td width="55">&nbsp;</td>
<td>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>用户名</td>
<td width="50">性别</td>
<td width="55"><?php if($_GET['view']=='show') { ?>竞价<?php } else { ?>积分<?php } ?></td>
<td width="55">人气</td>
<td width="55">好友</td>
<td width="50">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</thead>
<?php if(is_array($list)) { foreach($list as $key => $value) { ?>
<tr class="<?php if($key%2==1) { ?>  alt<?php } ?>">
<td><?php echo ($start+$key+1); ?></td>
<td><div class="avatar48"><a href="space.php?uid=<?=$value['uid']?>"><img src="<?php echo avatar($value[uid],small); ?>" alt="<?=$_SN[$value['uid']]?>" /></a></div></td>
<td>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>
<p<?php if($ols[$value['uid']]) { ?> class="online_icon_p"<?php } ?>>
<a href="space.php?uid=<?=$value['uid']?>" title="<?=$_SN[$value['uid']]?>"<?php g_color($value[groupid]); ?>><?=$_SN[$value['uid']]?></a>
<?php if($value['username'] && $_SN[$value['uid']]!=$value['username']) { ?><span class="gray">(<?=$value['username']?>)</span><?php } ?>
<?php g_icon($value[groupid]); ?>
</p>
</td>
<td width="50"><?php if($value['sex']==2) { ?>美女<?php } elseif($value['sex']==1) { ?>帅哥<?php } else { ?>保密<?php } ?></td>
<td width="55" title="积分"><?=$value['credit']?></td>
<td width="55" title="人气"><?=$value['viewnum']?></td>
<td width="55" title="好友"><?=$value['friendnum']?></td>
<td width="50">
<a href="cp.php?ac=poke&op=send&uid=<?=$value['uid']?>" id="a_poke_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999, '', -1)" title="打招呼"><img src="image/icon/poke.gif" align="absmiddle"></a>
<?php if(!$value['isfriend']) { ?><a href="cp.php?ac=friend&op=add&uid=<?=$value['uid']?>" id="a_friend_<?=$key?>" onclick="ajaxmenu(event, this.id, 99999, '', -1)" title="加好友"><img src="image/icon/friend.gif" align="absmiddle"></a><?php } ?>	
</td>
</tr>
</table>
<?php if($ols[$value['uid']]) { ?>
<div class="topline">
当前在线(<?php echo sgmdate('H:i',$ols[$value[uid]]); ?>)
</div>
<?php } ?>
<?php if($value['note']) { ?>
<div class="note">
<?=$value['note']?>
</div>
<?php } ?>
</td>
</tr>
<?php } } ?>
</table>
<div class="page"><?=$multi?></div>
<?php } else { ?>
<div class="c_form">没有相关成员。</div>
<?php } ?>
</div>



<?php } ?>

<script type="text/javascript">
var close = true;
var auc = new sAutoComplete("auc", "username_menu", "friendlist", "username", 0, searchFriend);
auc.addItem('<?=$friendstr?>');
function closeOpt(evt) {
if(evt.keyCode==9) {
$('username_menu').style.display='none';
}
}
function inputKeyDown(event, search) {
if(isUndefined(search)) search = 0;
if(event.keyCode == 13){
if(search) searchFriend();
doane(event);
}
}
function searchFriend() {
var username = $('username').value;
if(username == '搜索好友' || username == '') {
alert('请输入好友名称');
} else {
location.href ='space.php?do=friend&key='+username;
}
}
</script>

<?php if(empty($_SGLOBAL['inajax'])) { ?>
<?php if(empty($_TPL['nosidebar'])) { ?>
</div>
<!--/mainarea-->
<div id="bottom"></div>
</div>
<!--/main-->
<?php } ?>

<div id="footer" title="<?php echo debuginfo(); ?>">

<p class="r_option">
<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</p>

<?php if($_SGLOBAL['ad']['footer']) { ?>
<p style="padding:5px 0 10px 0;"><?php adshow('footer'); ?></p>
<?php } ?>

<p>
<?=$_SCONFIG['sitename']?> - 
<a href="mailto:<?=$_SCONFIG['adminemail']?>">联系我们</a>
<?php if($_SCONFIG['miibeian']) { ?> - <a  href="http://www.miibeian.gov.cn" target="_blank"><?=$_SCONFIG['miibeian']?></a><?php } ?>
</p>
<p>
Powered by <a  href="http://u.discuz.net" target="_blank"><strong>UCenter Home</strong></a> <span title="<?php echo X_RELEASE; ?>"><?php echo X_VER; ?></span>
<?php if(!empty($_SCONFIG['licensed'])) { ?><a  href="http://license.comsenz.com/?pid=7&host=<?=$_SERVER['HTTP_HOST']?>" target="_blank">Licensed</a><?php } ?>
&copy; 2001-2008 <a  href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a>
</p>
</div>
</div>
<!--/wrap-->

<?php if($_SGLOBAL['supe_uid']) { ?>
<?php if(!isset($_SCOOKIE['checkpm'])) { ?>
<script language="javascript"  type="text/javascript" src="cp.php?ac=pm&op=checknewpm&rand=<?=$_SGLOBAL['timestamp']?>"></script>
<?php } ?>
<?php if(!isset($_SCOOKIE['synfriend'])) { ?>
<script language="javascript"  type="text/javascript" src="cp.php?ac=friend&op=syn&rand=<?=$_SGLOBAL['timestamp']?>"></script>
<?php } ?>
<?php } ?>
<?php if(!isset($_SCOOKIE['sendmail'])) { ?>
<script language="javascript"  type="text/javascript" src="do.php?ac=sendmail&rand=<?=$_SGLOBAL['timestamp']?>"></script>
<?php } ?>

<?php if($_SGLOBAL['ad']['couplet']) { ?>
<script language="javascript" type="text/javascript" src="source/script_cookie.js"></script>
<script language="javascript" type="text/javascript" src="source/script_couplet.js"></script>
<div id="uch_couplet" style="z-index: 10; position: absolute; display:none">
<div id="couplet_left" style="position: absolute; left: 2px; top: 60px; overflow: hidden;">
<div style="position: relative; top: 25px; margin:0.5em;" onMouseOver="this.style.cursor='hand'" onClick="closeBanner('uch_couplet');"><img src="image/advclose.gif"></div>
<?php adshow('couplet'); ?>
</div>
<div id="couplet_rigth" style="position: absolute; right: 2px; top: 60px; overflow: hidden;">
<div style="position: relative; top: 25px; margin:0.5em;" onMouseOver="this.style.cursor='hand'" onClick="closeBanner('uch_couplet');"><img src="image/advclose.gif"></div>
<?php adshow('couplet'); ?>
</div>
<script type="text/javascript">
lsfloatdiv('uch_couplet', 0, 0, '', 0).floatIt();
</script>
</div>
<?php } ?>

</body>
</html>
<?php } ?>
<?php ob_out();?>